<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <on-start>
        <evaluate expression="personalInfoCreater.createPersonalInfo()" result="flowScope.personalInfo" />
    </on-start>

    <view-state id="collectName" view="Collector/NamePage" model="personalInfo">
        <!--<binder>-->
            <!--<binding property="name" />-->
        <!--</binder>-->
        <transition on="next" to="collectHobby"/>
        <transition on="cancel" to="cancel" bind="false"/>
    </view-state>

    <view-state id="collectHobby" view="Collector/HobbyPage" model="personalInfo">
        <!--<binder>-->
            <!--<binding property="hobby" />-->
        <!--</binder>-->
        <transition on="cancel" to="cancel"/>
        <transition on="next" to="showResult"/>
        <on-exit>
            <evaluate expression="fetcher.save(personalInfo)" />
            <evaluate expression="fetcher.all()" result="flowScope.allInfo"/>
        </on-exit>
    </view-state>

    <end-state id="cancel" view="externalRedirect:contextRelative:/spring_sample/index.do" />
    <view-state id="showResult" view ="Collector/ResultPage">
        <!--<binder>-->
            <!--<binding property="allInfo" />-->
        <!--</binder>-->
    </view-state>
</flow>